home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / WINDOWS / EZNET.ZIP / DEMO.ZIP / FLOWCHAR.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-10-31  |  8.1 KB  |  297 lines

  1. VERSION 4.00
  2. Begin VB.Form Form4 
  3.    Appearance      =   0  'Flat
  4.    BackColor       =   &H80000005&
  5.    Caption         =   "Example 4: FlowChart"
  6.    ClientHeight    =   4155
  7.    ClientLeft      =   1095
  8.    ClientTop       =   1485
  9.    ClientWidth     =   7365
  10.    DrawStyle       =   5  'Transparent
  11.    BeginProperty Font 
  12.       name            =   "MS Sans Serif"
  13.       charset         =   0
  14.       weight          =   700
  15.       size            =   8.25
  16.       underline       =   0   'False
  17.       italic          =   0   'False
  18.       strikethrough   =   0   'False
  19.    EndProperty
  20.    ForeColor       =   &H000000C0&
  21.    Height          =   4560
  22.    Left            =   1035
  23.    LinkTopic       =   "Form4"
  24.    MDIChild        =   -1  'True
  25.    ScaleHeight     =   4155
  26.    ScaleWidth      =   7365
  27.    Tag             =   "4"
  28.    Top             =   1140
  29.    Width           =   7485
  30.    Begin EasynetLib.Easynet Net1 
  31.       Height          =   3465
  32.       Left            =   240
  33.       TabIndex        =   4
  34.       Top             =   360
  35.       Width           =   4065
  36.       _Version        =   65538
  37.       _ExtentX        =   7170
  38.       _ExtentY        =   6112
  39.       _StockProps     =   101
  40.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  41.          name            =   "MS Sans Serif"
  42.          charset         =   0
  43.          weight          =   400
  44.          size            =   8.25
  45.          underline       =   0   'False
  46.          italic          =   0   'False
  47.          strikethrough   =   0   'False
  48.       EndProperty
  49.       BorderStyle     =   1
  50.       xGrid           =   5
  51.       yGrid           =   5
  52.       Shape           =   1
  53.       FillColor       =   16777215
  54.       DrawColor       =   8421504
  55.       ForeColor       =   0
  56.       DrawWidth       =   1
  57.       Oriented        =   -1  'True
  58.       ReadOnly        =   0   'False
  59.       MultiSel        =   -1  'True
  60.       ScrollBars      =   3
  61.       CanDrawNode     =   -1  'True
  62.       CanDrawLink     =   -1  'True
  63.       CanMoveNode     =   -1  'True
  64.       CanSizeNode     =   -1  'True
  65.       CanStretchLink  =   -1  'True
  66.       CanMultiLink    =   -1  'True
  67.       Transparent     =   0   'False
  68.       DrawStyle       =   5
  69.       Alignment       =   7
  70.       ShowGrid        =   0   'False
  71.       LinkHead        =   7
  72.       DoSelChange     =   -1  'True
  73.       DoAddNode       =   -1  'True
  74.       DoAddLink       =   -1  'True
  75.       Hiding          =   0   'False
  76.       ImageFile       =   ""
  77.       DisplayHandles  =   -1  'True
  78.       Zoom            =   100
  79.       AutoSize        =   2
  80.       AutoScroll      =   -1  'True
  81.    End
  82.    Begin VB.PictureBox Picture1 
  83.       Appearance      =   0  'Flat
  84.       AutoSize        =   -1  'True
  85.       BackColor       =   &H80000005&
  86.       ForeColor       =   &H80000008&
  87.       Height          =   930
  88.       Index           =   3
  89.       Left            =   4500
  90.       Picture         =   "FLOWCHAR.frx":0000
  91.       ScaleHeight     =   900
  92.       ScaleWidth      =   900
  93.       TabIndex        =   3
  94.       Top             =   3030
  95.       Visible         =   0   'False
  96.       Width           =   930
  97.    End
  98.    Begin VB.PictureBox Picture1 
  99.       Appearance      =   0  'Flat
  100.       AutoSize        =   -1  'True
  101.       BackColor       =   &H80000005&
  102.       ForeColor       =   &H80000008&
  103.       Height          =   930
  104.       Index           =   2
  105.       Left            =   4500
  106.       Picture         =   "FLOWCHAR.frx":0802
  107.       ScaleHeight     =   900
  108.       ScaleWidth      =   900
  109.       TabIndex        =   2
  110.       Top             =   2070
  111.       Visible         =   0   'False
  112.       Width           =   930
  113.    End
  114.    Begin VB.PictureBox Picture1 
  115.       Appearance      =   0  'Flat
  116.       AutoSize        =   -1  'True
  117.       BackColor       =   &H80000005&
  118.       ForeColor       =   &H80000008&
  119.       Height          =   930
  120.       Index           =   1
  121.       Left            =   4500
  122.       Picture         =   "FLOWCHAR.frx":1004
  123.       ScaleHeight     =   900
  124.       ScaleWidth      =   900
  125.       TabIndex        =   1
  126.       Top             =   1110
  127.       Visible         =   0   'False
  128.       Width           =   930
  129.    End
  130.    Begin VB.PictureBox Picture1 
  131.       Appearance      =   0  'Flat
  132.       AutoSize        =   -1  'True
  133.       BackColor       =   &H80000005&
  134.       ForeColor       =   &H80000008&
  135.       Height          =   930
  136.       Index           =   0
  137.       Left            =   4500
  138.       Picture         =   "FLOWCHAR.frx":1806
  139.       ScaleHeight     =   900
  140.       ScaleWidth      =   900
  141.       TabIndex        =   0
  142.       Top             =   150
  143.       Visible         =   0   'False
  144.       Width           =   930
  145.    End
  146. Attribute VB_Name = "Form4"
  147. Attribute VB_Creatable = False
  148. Attribute VB_Exposed = False
  149. Private Sub banner4()
  150.   Dim idLink2&, idLink1&
  151.   Dim org&, dst&
  152.   With Net1
  153.     .AddNodeItem
  154.     .X1 = 200
  155.     .Y1 = 200
  156.     .ForeColor = RGB(0, 0, 0)
  157.     .Text = "BEGIN"
  158.     .Picture = Picture1(1).Picture
  159.     .Shape = 2
  160.     .Type = 1
  161.     org = .item
  162.     .AddNodeItem
  163.     .X1 = 200
  164.     .Y1 = 2200
  165.     .Text = "STEP1"
  166.     .Picture = Picture1(0).Picture
  167.     .Type = 0
  168.     dst = .item
  169.     .AddLinkItem org, dst
  170.     .AddNodeItem
  171.     .X1 = 2200
  172.     .Y1 = 2200
  173.     .Text = "Success?"
  174.     .Picture = Picture1(2).Picture
  175.     .Shape = 3
  176.     .Type = 2
  177.     org = dst
  178.     dst = .item
  179.     .AddLinkItem org, dst
  180.     .AddNodeItem
  181.     .X1 = 4200
  182.     .Y1 = 1000
  183.     .Text = "STEP3"
  184.     .Picture = Picture1(0).Picture
  185.     .Type = 0
  186.     org = dst
  187.     dst = .item
  188.     .AddLinkItem org, dst
  189.     .PointCount = 1
  190.     .PointX(0) = 2640
  191.     .PointY(0) = 1440
  192.     .Text = "YES"
  193.     idLink1 = .item
  194.     .AddNodeItem
  195.     .X1 = 4200
  196.     .Y1 = 3400
  197.     .Text = "STEP2"
  198.     .Shape = 0
  199.     .Picture = Picture1(3).Picture
  200.     .Type = 3
  201.     dst = .item
  202.     .AddLinkItem org, dst
  203.     .PointCount = 1
  204.     .PointX(0) = 2640
  205.     .PointY(0) = 3840
  206.     .Text = "NO"
  207.     .LinkHead = 6
  208.     idLink2 = .item
  209.     .AddNodeItem
  210.     .X1 = 6200
  211.     .Y1 = 2200
  212.     .Text = "END"
  213.     .ForeColor = RGB(0, 0, 0)
  214.     .Picture = Picture1(1).Picture
  215.     .Shape = 2
  216.     .Type = 1
  217.     dst = .item
  218.     .item = idLink1
  219.     org = .dst
  220.     .AddLinkItem org, dst
  221.     .item = idLink2
  222.     org = .dst
  223.     .AddLinkItem org, dst
  224.     .LinkHead = 6
  225.     .item = 0
  226.   End With
  227. End Sub
  228. Private Sub Form_Activate()
  229.   ActivateForm
  230. End Sub
  231. Private Sub Form_Deactivate()
  232.   DeactivateForm
  233. End Sub
  234. Private Sub Form_Load()
  235.   MDI1.ShowExample(3).Enabled = False
  236.   Net1.Left = 0
  237.   Net1.Top = 0
  238.   SpeedON Net1
  239.   banner4
  240.   SpeedOFF Net1
  241. End Sub
  242. Private Sub Form_Resize()
  243.   If WindowState <> 1 And ScaleHeight <> 0 Then
  244.     Net1.Height = ScaleHeight
  245.     Net1.Width = ScaleWidth
  246.   End If
  247. End Sub
  248. Private Sub Form_Unload(Cancel As Integer)
  249.   MDI1.ShowExample(3).Enabled = True
  250.   MDI1.Command5.Enabled = False
  251.   MDI1.Command5.Caption = "Comments "
  252. End Sub
  253. Private Sub Net1_AddLink()
  254.   Net1.DrawStyle = 0
  255.   Net1.ForeColor = RGB(0, 0, 255)
  256. End Sub
  257. Private Sub Net1_AddNode()
  258. Net1.Picture = Picture1(0).Picture
  259. End Sub
  260. Private Sub Net1_DblClick()
  261.   If Net1.item <> 0 Then
  262.     If Net1.IsLink = False Then
  263.       Legend = Net1.Text
  264.       Picnum = Net1.Type
  265.       AutoSize = Net1.AutoSize
  266.       Alignment = Net1.Alignment
  267.       frmLegend.Show 1
  268.       If Ok Then
  269.         Net1.Text = Legend
  270.         Net1.Type = Picnum
  271.         Net1.AutoSize = AutoSize
  272.         Net1.Alignment = Alignment
  273.         Net1.Picture = Picture1(Picnum).Picture
  274.         'Choose a shape that is near picture shape
  275.         Select Case Picnum
  276.         Case 0   ' Rectangle
  277.           Net1.Shape = 1
  278.         Case 1
  279.           Net1.Shape = 2
  280.         Case 2
  281.           Net1.Shape = 3
  282.         Case 3
  283.           Net1.Shape = 0
  284.         End Select
  285.       End If
  286.     End If
  287.   End If
  288. End Sub
  289. Private Sub Net1_KeyDown(KeyCode As Integer, Shift As Integer)
  290.   If KeyCode = KEY_DELETE Then
  291.     Net1.DeleteSel
  292.   End If
  293. End Sub
  294. Private Sub Net1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  295.   CursorShape Net1
  296. End Sub
  297.